package com.link2room.blaster.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by LN on 2017/6/28.14:55
 */
@Entity
@Table(name = "in_mail_receive")
public class InMailReceiveEntity extends BaseEntity {
    private String mailId;
    private String receiverCode;
    private String hasRead;
    private String hasDone;
    @Basic
    @Column(name = "mail_id")
    public String getMailId() {
        return mailId;
    }

    public void setMailId(String mailId) {
        this.mailId = mailId;
    }

    @Basic
    @Column(name = "receiver_code")
    public String getReceiverCode() {
        return receiverCode;
    }

    public void setReceiverCode(String receiverCode) {
        this.receiverCode = receiverCode;
    }
    @Basic
    @Column(name = "has_read")
    public String getHasRead() {
        return hasRead;
    }

    public void setHasRead(String hasRead) {
        this.hasRead = hasRead;
    }

    @Basic
    @Column(name = "has_done")
    public String getHasDone() {
        return hasDone;
    }

    public void setHasDone(String hasDone) {
        this.hasDone = hasDone;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        InMailReceiveEntity that = (InMailReceiveEntity) o;

        if (mailId != null ? !mailId.equals(that.mailId) : that.mailId != null) return false;
        if (receiverCode != null ? !receiverCode.equals(that.receiverCode) : that.receiverCode != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = mailId != null ? mailId.hashCode() : 0;
        result = 31 * result + (receiverCode != null ? receiverCode.hashCode() : 0);
        return result;
    }
}
